useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_03'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'Ams_LocDownload_20041228.bin')
		click('Edit1')
		select('Table', 'cell:1|Brand_Id,2(TAR)')
		rightclick('Table', '1|Brand_Id,2')
		select_menu('Edit Record')
##		select('Table1', 'cell:1 - 3|Brand_Id,2(TAR)')
		click('Find1')
		select('TextField', 'liverpool')
##		click('MetalInternalFrameTitlePane', 170, 14)
		click('Find1')
##		click('MetalInternalFrameTitlePane', 271, 7)
		select('Table', 'cell:Data,3(Liverpool)')
		assert_p('Table', 'Text', 'Liverpool', 'Data,3')
		select('Table', 'cell:Data,4(Westfield Phoenix Plaza)')
		assert_p('Table', 'Text', 'Northumberland Street', 'Data,5')
		select('Table', 'cell:Data,5(Northumberland Street)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5093, 5093], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Liverpool, Liverpool], [Loc_Addr_Ln1, 5, , Westfield Phoenix Plaza, Westfield Phoenix Plaza], [Loc_Addr_Ln2, 6, , Northumberland Street, Northumberland Street], [Loc_Addr_Ln3, 7, , Liverpool, Liverpool], [Loc_Postcode, 8, , 2170, 2170], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,5(Northumberland Street)')
##		click('MetalInternalFrameTitlePane', 224, 20)
		click('Find1')
		select('TextField', 'target')
		click('Find1')
##		click('MetalInternalFrameTitlePane', 406, 15)
		select('Table', 'cell:Data,4(Target Canberra)')
		assert_p('Table', 'Text', 'Target Canberra', 'Data,4')
		select('Table', 'cell:Data,5(Canberra City Centre, Akuna Ave)')
		assert_p('Table', 'Text', 'Canberra', 'Data,6')
		select('Table', 'cell:Data,6(Canberra)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5096, 5096], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Canberra Civic, Canberra Civic], [Loc_Addr_Ln1, 5, , Target Canberra, Target Canberra], [Loc_Addr_Ln2, 6, , Canberra City Centre, Akuna Ave, Canberra City Centre, Akuna Ave], [Loc_Addr_Ln3, 7, , Canberra, Canberra], [Loc_Postcode, 8, , 2601, 2601], [Loc_State, 9, , ACT, ACT], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,6(Canberra)')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('Table', 'cell:1|Brand_Id,2(TAR)')
	close()
